package com.shop.util;

import java.io.IOException;

import org.apache.log4j.Logger;

import com.g3net.tool.FileUtils;

/**
 * 用于打印商城统计需求日志类
 * 
 * @author yuxiaowei
 * 
 */
public class Stat {

	private static Logger statlog = Logger.getLogger("stat");//

	public static void printLog(RequestArgs args) {
		String cinfo = args.getCinfo();
		String ip = args.getRemoteAddr();
		int funid = args.getFunid();
		String gid = args.getGoodsId();
		statlog.info(ip + ";" + cinfo + ";" + funid + ";" + gid);
	}

	public static void main(String[] args) {
		// ArrayUtils.toString(null);
		try {
			String s = FileUtils.readTxt("D:\\download\\temp.txt", "gbk");
			String[] ss = s.split("\n");
			for (int i = 0; i < ss.length; i++) {
				System.out.println(ss[i]);
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
